#include "widget.h"
#include "ui_widget.h"
#include <QPixmap>
#include <QPainter>


Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
    // Pixmap绘图设备 绘制图片的尺寸未500*500
    QPixmap pix(500,500);
    //QPainter(QPaintDevice *);
    // 指名绘画家 是在pixmap上绘画
    QPainter painter(&pix);
    painter.setPen(Qt::red);
    painter.drawEllipse(QPoint(100,100),100,100);
    pix.save("C:\\Code\\qt\\PicturAndImageAndPixmap\\pixmap.png");


}

Widget::~Widget()
{
    delete ui;
}

